/*
 * Copyright (c) 2015. For Intelligent Group.
 */

package com.intelligent.ispc.client.event;

import com.intelligent.ispc.core.dto.DynSearchFieldDto;

import java.util.List;

/**
 * Created by cherry on 2016/8/18.
 */
public class SearchParamsChangeEvent {

    public static final String TYPE_FILE = "file";
    public static final String TYPE_ITEM = "item";
    public static final String TYPE_CONDITION = "search_condition";

    private String type = TYPE_FILE;
    private boolean isMatched = true;
    private List<DynSearchFieldDto> params;
    private String module;

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    /**
     * Constructor.
     */
    public SearchParamsChangeEvent() {
    }

    /**
     * Constructor.
     *
     * @param module String module key
     * @param type String file type
     */
    public SearchParamsChangeEvent(String module, String type) {
        this.module = module;
        this.type = type;
    }

    /**
     * Constructor.
     *
     * @param module String module key
     * @param type String file type
     * @param isMatched boolean
     */
    public SearchParamsChangeEvent(String module, String type, boolean isMatched) {
        this.module = module;
        this.type = type;
        this.isMatched = isMatched;
    }

    /**
     * Constructor.
     *
     * @param params List<DynSearchFieldDto>
     */
    public SearchParamsChangeEvent(List<DynSearchFieldDto> params) {
        this.params = params;
    }

    public List<DynSearchFieldDto> getParams() {
        return params;
    }

    public boolean isMatched() {
        return isMatched;
    }

    public void setMatched(boolean matched) {
        isMatched = matched;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
